﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

using System.IO;
using System.Runtime.Serialization;

namespace UMLObjects
{
    [DataContract] //Make accessible for save
    [KnownType(typeof(Activity))]
    [KnownType(typeof(Decision))]
    [KnownType(typeof(InitialState))]
    [KnownType(typeof(FinalState))]
    [KnownType(typeof(Arrow))]
    public class ActivityDiagram
    {
        [DataMember] //Make accessible for save
        public string name { get; set; }

        [DataMember] //Make accessible for save
        public ObservableCollection<Activity> Activities { get; set; }

        [DataMember] //Make accessible for save
        public ObservableCollection<InitialState> InitialStates { get; set; }

        [DataMember] //Make accessible for save
        public ObservableCollection<Arrow> Arrows { get; set; }

        [DataMember] //Make accessible for save
        public ObservableCollection<Decision> Decisions { get; set; }

        [DataMember] //Make accessible for save
        public ObservableCollection<FinalState> FinalStates { get; set; }

        //Constructor
        public ActivityDiagram()
        {
            name = "New Activity Diagram";
            Activities = new ObservableCollection<Activity>();
            InitialStates = new ObservableCollection<InitialState>();
            Arrows = new ObservableCollection<Arrow>();
            Decisions = new ObservableCollection<Decision>();
            FinalStates = new ObservableCollection<FinalState>();
        }
    }
}
